<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="<?php echo base_url() ?>css/reset.css" type="text/css" rel="stylesheet" media="screen" />
        <link href="<?php echo base_url() ?>css/style.css" type="text/css" rel="stylesheet" media="screen" />
        <script type="text/javascript" src="<?php echo base_url() ?>js/jquery.js">
        </script>


        <script type="text/javascript">
            function rand_img(){
                var randnum = Math.random();
        
                var inum = <?php echo count($change_images) ?>;
        
                // Change this number to the number of images you are using.
                var rand1 = Math.round(randnum * (inum-1));
                images = new Array();

<?php
for ($i = 0; $i < count($change_images); $i++) {
    echo "images[$i]" . "='" . base_url() . "images/" . $change_images[$i]->url_image . "';";
}
?>
        // Ensure you have an array item for every image you are using.
        var image = images[rand1];
        document.getElementById('bg_img_change').src=image;
    }
    function random_bg(){
        setInterval(rand_img,2000);
    }      
        </script>
        <title>chi tiết loại sản phẩm</title>
    </head>
    <body onload="random_bg()" >

        <div id="slide"><img id="bg_img_change" src="<?php base_url() ?>images/slide_1.jpg" width="1024" height="599" />	</div>
        <div id="width">
            <div id="in">
                <div id="logo">
                    <a href="index.html"><img src="<?php base_url() ?>images/logo.png" /></a>
                    <div class="header_in"><img src="<?php base_url() ?>images/slogan.png" /></div>
                </div>
                <div class="right_header">
                    <a href="#" class="links_2">2</a>
                    <a href="#" class="links_3">3</a>
                    <a href="#" class="links_4">4</a>
                    <div class="clearboth_head">
                        <a href="#" class="flag_1" title="EN">1</a>
                        <a href="#" class="flag_2" title="VN">2</a>
                    </div>
                </div>
            </div>
            <div id="items">
                <ul class="nav">
                    <li><a href="<?php base_url() ?>/index" class="acti">trang chủ</a></li>
                    <li><a href="pages/gioithieu.html">giới thiệu</a>
                        <li><a href="<?php base_url() ?>pages/sanpham.html">sản phẩm</a>
                            <ul class="children">
                                <li><a href="pages/sanpham-chitiet.html" class="one_line">váy công sở</a></li>
                                <li><a href="#" class="one_line">đầm dạ hội</a></li>
                                <li><a href="#" class="one_line">thời trang dạo phố</a></li>
                                <li><a href="#" class="one_line">sơ mi nữ</a></li>
                            </ul>
                        </li>
                        <li><a href="#">xu hướng hiện nay</a></li>
                        <li><a href="#">phụ kiện</a></li>
                        <li><a href="<?php base_url() ?>pages/contact.html">liên hệ</a></li>
                </ul>
                <form class="search" action="#">
                    <div class="box_search">
                        <input type="text" class="in" placeholder="search" />
                        <input type="submit" class="btn_s" value="" />
                    </div>
                </form>
            </div>

        </div>

        <div id="width">
            <div class="slide_inner">

            </div>
        </div>

        <div id="width">
            <div class="bg2">
                <p class="sub"><a href="#" class="a1">Sản phẩm</a><img src="../images/icon_next.gif" class="icon_next" /><span class="ac">Sản phẩm công sở</span></p>
                <div class="box_1">
                    <ul class="nav_left">
                        <li class="indent_1"><a href="#" class="acti2">sản phẩm</a></li>
                        <li><a href="level_1.html">váy công sở</a></li>
                        <li><a href="#">đầm dạ hội</a></li>
                        <li><a href="#">thời trang dạo phố</a></li>
                        <li><a href="#">sơ mi nữ</a></li>
                        <li><a href="#">thời trang nam</a></li>
                    </ul>
                </div>


                
                <div class="box_3">
                    <?php foreach ($sanpham as $sp) {
                    ?>
                   
                    <h2>Bạn đang xem sản phẩm <?php echo $sp->ten_sp;?> của chúng tôi</h2>
                    <div class="tab">
                        <div><img src="<?php echo base_url()."upload/img_product/".$sp->hinh_sp?>" style="width:140px;height:150px;" /></div>
                        <div class="left">
                            <h4>About Fashion Women</h4>
                            <div class="clearboth">
                                <p class="tab_1s">Giá :</p>
                                <p class="colr"><span><?php echo $sp->gia;?> </span></p>
                            </div>
                            <div class="clearboth">
                                <p class="tab_1s">Thông báo :</p>
                                <p class="tab1s_inner"><?php echo ($sp->soluong_sp > 0)? "Có hàng":"Hết hàng"; ?></p>
                            </div>
                            <div class="clearboth">
                                <p class="tab_1s">Số lượng:</p>
                                <p class="tab1s_inner"><?php echo $sp->soluong_sp ?></p>
                            </div>
                            <p><input type="button" value="ADD TO CART" class="btn_add" /></p>
                        </div>
                    </div>
                    <span class="head2">Chi tiết</span>
                    <div class="indent_text">
                        <p>
                            <?php echo $sp->gioithieu_sp?>
                        </p>
                        <p><img src="<?php echo base_url()."upload/img_product/".$sp->hinh_sp?>" style="width:600px;height:299px;"/></p>
                        
                        <div class="header">Links</div>
                        <ul class="nav_1">
                            <li><a href="#">About us</a></li>
                            <li><a href="#">Innovation & technology</a></li>
                            <li><a href="#">Operations</a></li>
                            <li><a href="#">Regulations</a></li>
                            <li><a href="#">Risks</a></li>
                        </ul>
                        <!--End nav_1-->
                        <ul class="nav_1">
                            <li><a href="#">About us</a></li>
                            <li><a href="#">Innovation & technology</a></li>
                            <li><a href="#">Operations</a></li>
                            <li><a href="#">Regulations</a></li>
                            <li><a href="#">Risks</a></li>
                        </ul>
                        <!--End nav_1-->
                        <ul class="nav_1">
                            <li><a href="#">About us</a></li>
                            <li><a href="#">FAQ</a></li>
                            <li><a href="#">Blog</a></li>
                            <li><a href="#">Contact</a></li>
                            <li><a href="#">Careers</a></li>
                        </ul>
                        <!--End nav_1-->
                    </div>
                </div>
                <?php } ?>
                <div class="den_foot"></div>
                <div class="clearboth">
                    <span class="macro"><span class="dotted3"></span><span class="head_text2">liên hệ với chúng tôi</span><span class="dotted4"></span></span>
                </div>
                <div class="clear_foot">
                    <div id="items2">
                        <a href="#"><img src="../images/map_google.gif" /></a>
                    </div>
                    <div class="foot_text">
                        <p>orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the indu sndard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
                    </div>
                    <div class="floatright">
                        <a href="#"><img src="../images/yahoo.gif" /></a>
                    </div>
                </div>

            </div>
        </div>
        </div>

    </body>
</html>
